package com.ee.chat.common.util;

/**
 * 常用常量控制类
 * @Author Shane
 * @Date 2020/8/4 14:50
 */
public class ConstantsUtil {

    /** --------------------------------------------redis key begin-------------------------------------------------------------------- */
    /**
     * 系统全局变量
     */
    //
    public static final String DATA_FLAG_PLATFORM = "data:flag:platform:";

    /**
     * 验证码
     * data:code:login:13500000000
     * data:code:bind:13500000000
     */
    public static final String DATA_CODE = "data:code:";

    /**
     * 用户登录标识
     */
    public static final String USER_TOKEN = "user:token:";

    /**
     * 记录用户在线状态
     */
    public static final String USER_ONLINE = "user:online:";

    /**
     * 用户操作记录
     */
    public static final String USER_OP = "user:op:";

    /**
     * 用户已返回过的数据
     */
    public static final String USER_HISTORY_TITLE = "user:history:title:";
    public static final String USER_HISTORY_HOT = "user:history:hot:";
    public static final String USER_HISTORY_ONLINE = "user:history:online:";
    public static final String USER_HISTORY_NEW = "user:history:new:";
    public static final String USER_HISTORY_RANDOM = "user:history:random:";

    /**
     * 记录同城模块打招呼
     */
    public static final String USER_LOCAL_SAYHELLO = "user:local:sayHello:";

    /**
     * websocket通讯
     */
    public static final String USER_WS_OPERATION = "user:ws:operation";

    /**
     * 社区模块
     */
    public static final String DYNAMIC_HISTORY_HOT = "dynamic:history:hot:";

    /**
     * 记录用户即时通讯数据
     */
    /**
     * key: from:fromUserId  记录用户自己
     * {
     * 	total: 10,      消息总数
     * 	TEXT_total: 10  文本消息总数
     * 	TEXT_1_total: 10    系统发送文本消息总数
     * 	today: 2021-03-11   今日
     * 	today_total: 10     今日消息总数
     * 	today_TEXT_total: 10    今日文本消息总数
     * 	today_TEXT_1_toal: 10   今填系统发送文本消息总数
     * }
     *
     * key: to:toUserId
     * {
     *     同上
     * }
     *
     * key: send:fromUserId:toUserId
     * {
     *     同上,
     *     succ: 0      连续消息数量
     *     consume: 1   是否已经消费(回复或通话)，0-未消费 1-已消费
     * }
     *
     * //记录消息标记
     * key:msgid:123
     */
    public static final String USER_IM = "user:im:";
    /**
     * key: from:fromUserId
     * {
     *     total: 10    通话总数
     *     success: 10  成功总数
     *     day：2021-03-11   今日
     *     today_total: 10  今日通话总数
     *     today_success: 10    今日成功总数
     * }
     *
     *
     */
    public static final String USER_CALL = "user:call:";

    /**
     * 用户标记
     */
    /**
     * startCall:channelId  开始通话标记
     * endCall:channelId    结束通话标记
     * kindReminder:userId
     *
     */
    public static final String USER_FLAG = "user:flag:";


    /** --------------------------------------------redis key end-------------------------------------------------------------------- */

}
